﻿<UserControl x:Class="WpWinNl.Controls.AboutContents"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:baseModels="clr-namespace:WpWinNl.BaseModels"
             d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True,
                                              Type=baseModels:AboutViewModelBase}"
             d:DesignHeight="800"
             d:DesignWidth="480"
             FontFamily="{StaticResource PhoneFontFamilyNormal}"
             FontSize="{StaticResource PhoneFontSizeNormal}"
             Foreground="{StaticResource PhoneForegroundBrush}"
             mc:Ignorable="d">

  <Grid x:Name="ContentPanel"
          Grid.Row="1"
          Margin="0">
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Grid VerticalAlignment="Top">
      <Grid.RowDefinitions>
        <RowDefinition Height="34" />
        <RowDefinition Height="28" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>

      <StackPanel Orientation="Horizontal">
        <TextBlock Margin="12,0,0,0"
                           VerticalAlignment="Bottom"
                           FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                           FontSize="{StaticResource PhoneFontSizeLarge}"
                           Foreground="{StaticResource PhoneAccentBrush}"
                           Text="{Binding AppTitle}" />
        <TextBlock Margin="12,0,0,2"
                           VerticalAlignment="Bottom"
                           FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                           FontSize="{StaticResource PhoneFontSizeMediumLarge}"
                           Text="{Binding ApplicationVersion}" />
      </StackPanel>
      <TextBlock Grid.Row="1"
                       Margin="12,0"
                       VerticalAlignment="Top"
                       Text="{Binding Copyright}"
                       TextWrapping="Wrap" />
      <ScrollViewer Grid.Row="2" Margin="0,10,0,0">
        <StackPanel Orientation="Vertical">
          <TextBlock Margin="12,0"
                               Text="{Binding SupportMessage}"
                               TextWrapping="Wrap"
                               d:LayoutOverrides="Width" />
          <Button x:Name="MailButton" Padding="17,12" Command="{Binding SupportQuestionCommand, Mode=OneWay}">
            <Canvas xmlns="http://schemas.microsoft.com/client/2007"
                                Width="23.903"
                                Height="18.441">
              <Path Data="F1 M 2.446,15.994 L 2.446,5.334 L 11.021,12.021 C 11.243,12.193 11.510,12.279 11.774,12.279 C 12.038,12.279 12.303,12.193 12.524,12.023 L 21.457,5.100 L 21.457,15.994 L 2.446,15.994 Z M 20.883,2.447 L 11.776,9.506 L 2.728,2.447 L 20.883,2.447 Z M 22.678,0.000 L 1.221,0.000 C 0.547,0.000 0.000,0.547 0.000,1.223 L 0.000,17.217 C 0.000,17.893 0.547,18.441 1.221,18.441 L 22.678,18.441 C 23.354,18.441 23.903,17.893 23.903,17.217 L 23.903,1.223 C 23.903,0.547 23.354,0.000 22.678,0.000" Fill="{StaticResource PhoneForegroundBrush}" />
            </Canvas>
          </Button>
          <StackPanel x:Name="BuyPanel"
                                Orientation="Vertical"
                                Visibility="{Binding BuyPanelVisible}">

            <TextBlock Margin="12,0,10,0"
                                   Text="{Binding BuyTheApp}"
                                   TextWrapping="Wrap" />
            <Button x:Name="BuyButton" Content="{Binding Buy}" Command="{Binding BuyCommand, Mode=OneWay}">
            </Button>
          </StackPanel>
          <TextBlock Margin="12,0" HorizontalAlignment="Left" Text="{Binding ReviewTheApp}" TextWrapping="Wrap" />
          <Button x:Name="ReviewButton" Content="{Binding Review}" Command="{Binding ReviewCommand, Mode=OneWay}" />
          <Button x:Name="OtherAppsButton" Content="{Binding OtherApps}" Margin="0,-12,0,0"  Command="{Binding ViewOtherAppsCommand, Mode=OneWay}"/>
          <Button x:Name="ShareAppButton" Content="{Binding ShareApp}" Margin="0,-12,0,0" Command="{Binding ShareAppCommand, Mode=OneWay}"/>
        </StackPanel>
      </ScrollViewer>
    </Grid>
    <HyperlinkButton Grid.Row="1"
                     Margin="0,0,0,6"
                     Content="{Binding CompanyUrl}" NavigateUri="{Binding CompanyUrl}">
    </HyperlinkButton>
  </Grid>
</UserControl>
